package com.qilin.hscs.controller;

import com.qilin.hscs.vo.ResultVO;
import com.qilin.hscs.enums.ResultEnum;
import com.qilin.hscs.exception.SMException;
import com.qilin.hscs.form.HostNameForm;
import com.qilin.hscs.service.impl.HostServiceImpl;
import com.qilin.hscs.util.ResultVOUntil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.*;

import javax.validation.Valid;
import javax.xml.transform.Result;

@RestController
@RequestMapping("/host")
public class HostController {


    @Autowired
    private HostServiceImpl hostService;

    @PostMapping("/addHost")
    public ResultVO addHost() {
        return null;
        //todo
    }

    @GetMapping("/getHostData")
    public ResultVO findHostByMac(String mac){

        return hostService.findHostByMac(mac);
    }

    @PostMapping("/updataHost")
    public ResultVO modifyHostNameByMac(String mac,String name){
        return hostService.modifyHostNameByMac(mac, name);
    }

    //todo
    public ResultVO delHostByMac(String mac){
        //todo
        return null;
    }
}
